trigger CxgCampaignMemberStatusUpdate on Task (after insert, after update) {

ID CxGcampaignmemberrecordtypeID = RecordTypeHelper.GetRecordTypeIdByDevName('Task', 'CXG_Task_Layout'); 

    if(trigger.isInsert){  
        for(Task tsk :trigger.new){
            if(tsk.recordtypeid == CxGcampaignmemberrecordtypeID ){
               
                CXGCampaignMemberOperation.CampaignMemberStatusUpdate(trigger.new);
                CXGCampaignMemberOperation.CampaignMemberCallsIncrement(trigger.new);
                }
          }
    }
    
    if(trigger.isUpdate){
         for(task t: trigger.new){
                if(t.recordtypeid == CxGcampaignmemberrecordtypeID ){

                CXGCampaignMemberOperation.CampaignMemberStatusUpdate(trigger.new);
                //CXGCampaignMemberOperation.CampaignMemberCallsIncrement(trigger.new);
                }
            }    
      }
}